home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / indent~1.zoo / indent.inf < prev    next >
Encoding:
GNU Info File  |  1992-08-06  |  38.1 KB  |  1,146 lines

  1. This is Info file indent.info, produced by Makeinfo-1.47 from the input
  2. file ./indent.texinfo.
  3.  
  4.    Copyright (C) 1989, 1992 Free Software Foundation, Inc.
  5.  
  6.    This is Edition 0.02, 5 May 1992, of `The `indent' Manual', for
  7. Indent Version 1.3
  8.  
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.  
  13. File: indent.info,  Node: Top,  Next: Indent Program,  Prev: (dir),  Up: (dir)
  14.  
  15. `indent':  Indent and Format C Program Source
  16. *********************************************
  17.  
  18.    The `indent' program changes the appearance of a C program by
  19. inserting or deleting whitespace.
  20.  
  21.    This is Edition 0.02, May 1992, of `The `indent' Manual', for Indent
  22. Version 1.3
  23.  
  24. * Menu:
  25.  
  26. * Indent Program::              The `indent' Program
  27. * Option Summary::              Option Summary
  28. * Index::                       Index
  29.  
  30. File: indent.info,  Node: Indent Program,  Next: Option Summary,  Prev: Top,  Up: Top
  31.  
  32. The `indent' Program
  33. ********************
  34.  
  35.    The `indent' program can be used to make code easier to read.  It
  36. can also convert from one style of writing C to another.
  37.  
  38.    `indent' understands a substantial amount about the syntax of C, but
  39. it also attempts to cope with incomplete and misformed syntax.
  40.  
  41.    In version 1.2 and more recent versions, the GNU style of indenting
  42. is the default.
  43.  
  44. * Menu:
  45.  
  46. * Invoking indent::             Invoking `indent'
  47. * Backup files::                Backup Files
  48. * Common styles::               Common styles
  49. * Blank lines::                 Blank lines
  50. * Comments::                    Comments
  51. * Statements::                  Statements
  52. * Declarations::                Declarations
  53. * Indentation::                 Indentation
  54. * Miscellaneous options::       Miscellaneous options
  55. * Copyright::                   Copyright
  56.  
  57. File: indent.info,  Node: Invoking indent,  Next: Backup files,  Up: Indent Program
  58.  
  59. Invoking `indent'
  60. =================
  61.  
  62.    As of version 1.3, the format of the `indent' command is:
  63.  
  64.      indent [OPTIONS] [INPUT-FILES]
  65.      
  66.      indent [OPTIONS] [SINGLE-INPUT-FILE] [-o OUTPUT-FILE]
  67.  
  68.    This format is different from earlier versions and other versions of
  69. `indent'.
  70.  
  71.    In the first form, one or more input files are specified.  `indent'
  72. makes a backup copy of each file, and the original file is replaced with
  73. its indented version.  *Note Backup files::, for an explanation of how
  74. backups are made.
  75.  
  76.    In the second form, only one input file is specified.  In this case,
  77. or when the standard input is used, you may specify an output file after
  78. the `-o' option.
  79.  
  80.    To cause `indent' to write to standard output, use the `-st' option.
  81.  This is only allowed when there is only one input file, or when the
  82. standard input is used.
  83.  
  84.    If no input files are named, the standard input is read for input.
  85. Also, if a filename named `-' is specified, then the standard input is
  86. read.
  87.  
  88.    As an example, each of the following commands will input the program
  89. `slithy_toves.c' and write its indented text to `slithy_toves.out':
  90.  
  91.      indent slithy_toves.c -o slithy_toves.out
  92.      
  93.      indent -st slithy_toves.c > slithy_toves.out
  94.      
  95.      cat slithy_toves.c | indent -o slithy_toves.out
  96.  
  97.    Most other options to `indent' control how programs are formatted.
  98. As of version 1.2, `indent' also recognizes a long name for each option
  99. name.  Long options are prefixed by either `--' or `+'.(1) In most of
  100. this document, the traditional, short names are used for the sake of
  101. brevity. *Note Option Summary::, for a list of options, including both
  102. long and short names.
  103.  
  104.    Here is another example:
  105.  
  106.      indent -br test/metabolism.c -l85
  107.  
  108.    This will indent the program `test/metabolism.c' using the `-br' and
  109. `-l85' options, write the output back to `test/metabolism.c', and write
  110. the original contents of `test/metabolism.c' to a backup file in the
  111. directory `test'.
  112.  
  113.    Equivalent invocations using long option names for this example would
  114. be:
  115.  
  116.      indent --braces-on-if-line --line-length185 test/metabolism.c
  117.      
  118.      indent +braces-on-if-line +line-length185 test/metabolism.c
  119.  
  120.    If you find that you often use `indent' with the same options, you
  121. may put those options into a file called `.indent.pro'. `indent' will
  122. first look for `.indent.pro' in the current directory and use that if
  123. found.  Otherwise, `indent' will search your home directory for
  124. `.indent.pro' and use that file if it is found.  This behaviour is
  125. different from that of other versions of `indent', which load both
  126. files if they both exist.
  127.  
  128.    Command line switches are handled *after* processing `.indent.pro'. 
  129. Options specified later override arguments specified earlier, with one
  130. exception: Explicitly specified options always override background
  131. options (*note Common styles::.).  You can prevent `indent' from
  132. reading an `.indent.pro' file by specifying the `-npro' option.
  133.  
  134.    ---------- Footnotes ----------
  135.  
  136.    (1)   `+' is being superseded by `--' to maintain consistency with
  137. the POSIX standard.
  138.  
  139. File: indent.info,  Node: Backup files,  Next: Common styles,  Prev: Invoking indent,  Up: Indent Program
  140.  
  141. Backup Files
  142. ============
  143.  
  144.    As of version 1.3, GNU `indent' makes GNU--style backup files, the
  145. same way GNU Emacs does.  This means that either "simple" or "numbered"
  146. backup filenames may be made.
  147.  
  148.    Simple backup file names are generated by appending a suffix to the
  149. original file name.  The default for the this suffix is the
  150. one-character string `~' (tilde).  Thus, the backup file for `python.c'
  151. would be `python.c~'.
  152.  
  153.    Instead of the default, you may specify any string as a suffix by
  154. setting the environment variable `SIMPLE_BACKUP_SUFFIX' to your
  155. preferred suffix.
  156.  
  157.    Numbered backup versions of a file `momewraths' look like
  158. `momewraths.c.~23~', where 23 is the version of this particular backup.
  159.  When making a numbered backup of the file `src/momewrath.c', the
  160. backup file will be named `src/momewrath.c.~V~', where V is one greater
  161. than the highest version currently existing in the directory `src'.
  162.  
  163.    The type of backup file made is controlled by the value of the
  164. environment variable `VERSION_CONTROL'.  If it is the string `simple',
  165. then only simple backups will be made.  If its value is the string
  166. `numbered', then numbered backups will be made.  If its value is
  167. `numbered-existing', then numbered backups will be made if there
  168. *already exist* numbered backups for the file being indented;
  169. otherwise, a simple backup is made.  If `VERSION_CONTROL' is not set,
  170. then `indent' assumes the behaviour of `numbered-existing'.
  171.  
  172.    Other versions of `indent' use the suffix `.BAK' in naming backup
  173. files.  This behaviour can be emulated by setting
  174. `SIMPLE_BACKUP_SUFFIX' to `.BAK'.
  175.  
  176.    Note also that other versions of `indent' make backups in the
  177. current directory, rather than in the directory of the source file as
  178. GNU `indent' now does.
  179.  
  180. File: indent.info,  Node: Common styles,  Next: Blank lines,  Prev: Backup files,  Up: Indent Program
  181.  
  182. Common styles
  183. =============
  184.  
  185.    There are several common styles of C code, including the GNU style,
  186. the Kernighan & Ritchie style, and the original Berkeley style.  A
  187. style may be selected with a single "background" option, which
  188. specifies a set of values for all other options.  However, explicitly
  189. specified options always override options implied by a background
  190. option.
  191.  
  192.    As of version 1.2, the default style of GNU `indent' is the GNU
  193. style.  Thus, it is no longer neccessary to specify the option `-gnu'
  194. to obtain this format, although doing so will not cause an error. 
  195. Option settings which correspond to the GNU style are:
  196.  
  197.      -nbad -bap -nbbb -nbc -bl -bli2 -c33 -cd33 -ncdb -nce
  198.      -cli0 -cp1 -di2 -nfc1 -nfca -i2 -ip5 -lp -pcs -psl -cs
  199.      -nsc -nsob -nss -ts8 -d0 -ci0 -l78
  200.  
  201.    The GNU coding style is that preferred by the GNU project.  It is the
  202. style that the GNU Emacs C mode encourages and which is used in the C
  203. portions of GNU Emacs.  (People interested in writing programs for
  204. Project GNU should get a copy of `The GNU Coding Standards', which also
  205. covers semantic and portability issues such as memory usage, the size
  206. of integers, etc.)
  207.  
  208.    The Kernighan & Ritchie style is used throughout their well-known
  209. book `The C Programming Language'.  It is enabled with the `-kr'
  210. option.  The Kernighan & Ritchie style corresponds to the following set
  211. of options:
  212.  
  213.      -nbad -bap -nbbb -nbc -br -c33 -cd33 -ncdb -ce -ci4
  214.      -cli0 -cp33 -d0 -di1 -nfc1 -nfca -i4 -ip0 -l75 -lp
  215.      -npcs -npsl -nsc -nsob -nss -ts8 -cs
  216.  
  217. Kernighan & Ritchie style does not put comments to the right of code in
  218. the same column at all times (nor does it use only one space to the
  219. right of the code), so for this style `indent' has arbitrarily chosen
  220. column 33.
  221.  
  222.    The style of the original Berkeley `indent' may be obtained by
  223. specifying `-orig' (or by specifyfying `--original', using the long
  224. option name).  This style is equivalent to the following settings:
  225.  
  226.      -nbap -nbad -nbbb -bc -br -c33 -cd33 -cdb -ce -ci4
  227.      -cli0 -cp33 -d4 -di16 -fc1 -fca -i4 -ip4 -l75 -lp
  228.      -npcs -psl -sc -nsob -nss -ts8 -ncs
  229.  
  230. File: indent.info,  Node: Blank lines,  Next: Comments,  Prev: Common styles,  Up: Indent Program
  231.  
  232. Blank lines
  233. ===========
  234.  
  235.    Various programming styles use blank lines in different places.
  236. `indent' has a number of options to insert or delete blank lines in
  237. specific places.
  238.  
  239.    The `-bad' option causes `indent' to force a blank line after every
  240. block of declarations.  The `-nbad' option causes `indent' not to force
  241. such blank lines.
  242.  
  243.    The `-bap' option forces a blank line after every procedure body.
  244. The `-nbap' option forces no such blank line.
  245.  
  246.    The `-bbb' option forces a blank line before every block comment. A
  247. block comment is one which starts in column one when formatting of such
  248. comments is disabled, or one with `-' or `*' immediately following the
  249. `/*'.  The `-nbbb' option does not force such blank lines.
  250.  
  251.    The `-sob' option causes `indent' to swallow optional blank lines
  252. (that is, any optional blank lines present in the input will be removed
  253. from the output).  If the `-nsob' is specified, any blank lines present
  254. in the input file will be copied to the output file.
  255.  
  256. * Menu:
  257.  
  258. * -bad::                        More on the `-bad' option.
  259. * -bap::                        More on the `-bap' option.
  260.  
  261. File: indent.info,  Node: -bad,  Next: -bap,  Up: Blank lines
  262.  
  263. --blank-lines-after-declarations
  264. --------------------------------
  265.  
  266.    The `-bad' option forces a blank line after every block of
  267. declarations.  The `-nbad' option does not add any such blank lines.
  268.  
  269.    For example, given the input
  270.      char *foo;
  271.      char *bar;
  272.      /* This separates blocks of declarations.  */
  273.      int baz;
  274.  
  275. `indent -bad' produces
  276.  
  277.      char *foo;
  278.      char *bar;
  279.      
  280.      /* This separates blocks of declarations.  */
  281.      int baz;
  282.  
  283. and `indent -nbad' produces
  284.  
  285.      char *foo;
  286.      char *bar;
  287.      /* This separates blocks of declarations.  */
  288.      int baz;
  289.  
  290. File: indent.info,  Node: -bap,  Prev: -bad,  Up: Blank lines
  291.  
  292. --blank-lines-after-procedures
  293. ------------------------------
  294.  
  295.    The `-bap' option forces a blank line after every procedure body.
  296.  
  297.    For example, given the input
  298.  
  299.      int
  300.      foo ()
  301.      {
  302.        puts("Hi");
  303.      }
  304.      /* The procedure bar is even less interesting.  */
  305.      char *
  306.      bar ()
  307.      {
  308.        puts("Hello");
  309.      }
  310.  
  311. `indent -bap' produces
  312.  
  313.      int
  314.      foo ()
  315.      {
  316.        puts ("Hi");
  317.      }
  318.      
  319.      /* The procedure bar is even less interesting.  */
  320.      char *
  321.      bar ()
  322.      {
  323.        puts ("Hello");
  324.      }
  325.  
  326. and `indent -nbap' produces
  327.  
  328.      int
  329.      foo ()
  330.      {
  331.        puts ("Hi");
  332.      }
  333.      /* The procedure bar is even less interesting.  */
  334.      char *
  335.      bar ()
  336.      {
  337.        puts ("Hello");
  338.      }
  339.  
  340. No blank line will be added after the procedure `foo'.
  341.  
  342. File: indent.info,  Node: Comments,  Next: Statements,  Prev: Blank lines,  Up: Indent Program
  343.  
  344. Comments
  345. ========
  346.  
  347.    Comments are no longer formatted by default as of version 1.2.  This
  348. can be enabled with the `-fca' option.  Doing so will cause newlines in
  349. the comment text to be ignored and the line will be filled up to the
  350. length of a line (which can be modified with `-l').  When formatting is
  351. enabled, blank lines indicate paragraph breaks.
  352.  
  353.    The `-fc1' option enables the formatting of comments which begin in
  354. the first column.  The `-nfc1' option disables the formatting of first
  355. column comments.  When comment formatting is disabled, overall comment
  356. indentation may still be adjusted.
  357.  
  358.    The indentation of comments which do not appear to the right of code
  359. is set by the `-d' option, which specifies the number of spaces to the
  360. left of the surrounding code that the comment appears.  For example,
  361. `-d2' places comments two spaces to the left of code; `-d0' lines up
  362. comments with the code.  The `-cdb' option controls whether the `/*'
  363. and `*/' are placed on blank lines.  With `-cdb', comments look like
  364. this:
  365.  
  366.      /*
  367.       * this is a comment
  368.       */
  369.  
  370. With `-ncdb', comments look like this:
  371.  
  372.      /* this is a comment */
  373.  
  374. `-cdb' only affects block comments, not comments to the right of code. 
  375. The default is `-ncdb'.
  376.  
  377.    Comments which appear on the same line as code are placed to the
  378. right. The column in which comments on code start is controlled by the
  379. `-c' option.  The column in which comments to the right of declarations
  380. start is controlled by the `-cd' option.  By default, they start in the
  381. same column as comments to the right of code, which is column 33.  The
  382. column number for comments to the right of `#else' and `#endif'
  383. statements is controlled by the `-cp' option.  If the code on a line
  384. extends past the comment column, the comment starts further to the
  385. right, and the right margin may be automatically extended in extreme
  386. cases.
  387.  
  388.    If the `-sc' option is specified, `*' is placed at the left edge of
  389. all comments.  For example:
  390.  
  391.      /* This is a comment which extends from one line
  392.       * onto the next line, thus causing us to consider
  393.       * how it should continue.  */
  394.  
  395. instead of
  396.  
  397.      /* This is a comment which extends from one line
  398.         onto the next line, thus causing us to consider
  399.         how it should continue.  */
  400.  
  401. File: indent.info,  Node: Statements,  Next: Declarations,  Prev: Comments,  Up: Indent Program
  402.  
  403. Statements
  404. ==========
  405.  
  406.    The `-br' or `-bl' option specifies how to format braces.
  407.  
  408.    The `-br' option formats braces like this:
  409.  
  410.      if (x > 0) {
  411.        x--;
  412.      }
  413.  
  414. The `-bl' option formats them like this:
  415.  
  416.      if (x > 0)
  417.        {
  418.          x--;
  419.        }
  420.  
  421.    If you use the `-bl' option, you may also want to specify the `-bli'
  422. option.  This option specifies the number of spaces by which braces are
  423. indented.  `-bli2', the default, gives the result shown above.  `-bli0'
  424. results in the following:
  425.  
  426.      if (x > 0)
  427.      {
  428.        x--;
  429.      }
  430.  
  431.    If you are using the `-br' option, you probably want to also use the
  432. `-ce' option.  This causes the `else' in an if-then-else construct to
  433. cuddle up to the immediately preceding `}'.  For example, with `-br
  434. -ce' you get the following:
  435.  
  436.      if (x > 0) {
  437.        x--;
  438.      } else {
  439.        fprintf (stderr, "...something wrong?\n");
  440.      }
  441.  
  442. With `-br -nce' that code would appear as
  443.  
  444.      if (x > 0) {
  445.        x--;
  446.      }
  447.      else {
  448.        fprintf (stderr, "...something wrong?\n");
  449.      }
  450.  
  451.    The `-cli' option specifies the number of spaces that case labels
  452. should be indented to the right of the containing `switch' statement.
  453.  
  454.    If a semicolon is on the same line as a `for' or `while' statement,
  455. the `-ss' option will cause a space to be placed before the semicolon. 
  456. This emphasizes the semicolon, making it clear that the body of the
  457. `for' or `while' statement is an empty statement. `-nss' disables this
  458. feature.
  459.  
  460.    The `-pcs' option causes a space to be placed between the name of
  461. the procedure being called and the `(' (for example, `puts ("Hi");'. 
  462. The `-npcs' option would give `puts("Hi");').
  463.  
  464.    If the `-cs' option is specified, `indent' puts a space after a cast
  465. operator.
  466.  
  467.    The `-bs' option ensures that there is a space between the keyword
  468. `sizeof' and its argument.  In some versions, this is known as the
  469. `Bill_Shannon' option.
  470.  
  471. File: indent.info,  Node: Declarations,  Next: Indentation,  Prev: Statements,  Up: Indent Program
  472.  
  473. Declarations
  474. ============
  475.  
  476.    By default `indent' will line up identifiers, in the column
  477. specified by the `-di' option.  For example, `-di16' makes things look
  478. like:
  479.  
  480.      int             foo;
  481.      char           *bar;
  482.  
  483.    Using a small value (such as one or two) for the `-di' option can be
  484. used to cause the indentifiers to be placed in the first available
  485. position, for example
  486.  
  487.      int foo;
  488.      char *bar;
  489.  
  490.    The value given to the `-di' option will still affect variables
  491. which are put on separate lines from their types, for example `-di2'
  492. will lead to
  493.  
  494.      int
  495.        foo;
  496.  
  497.    If the `-bc' option is specified, a newline is forced after each
  498. comma in a declaration.  For example,
  499.  
  500.      int a,
  501.        b,
  502.        c;
  503.  
  504. With the `-nbc' option this would look like
  505.  
  506.      int a, b, c;
  507.  
  508.    The `-psl' option causes the type of a procedure being defined to be
  509. placed on the line before the name of the procedure.  This style is
  510. required for the `etags' program to work correctly, as well as some of
  511. the `c-mode' functions of Emacs.
  512.  
  513.    If you are not using the `-di1' option to place variables being
  514. declared immediately after their type, you need to use the `-T' option
  515. to tell `indent' the name of all the typenames in your program that are
  516. defined by `typedef'.  `-T' can be specified more than once, and all
  517. names specified are used.  For example, if your program contains
  518.  
  519.      typedef unsigned long CODE_ADDR;
  520.      typedef enum {red, blue, green} COLOR;
  521.  
  522. you would use the options `-T CODE_ADDR -T COLOR'.
  523.  
  524. File: indent.info,  Node: Indentation,  Next: Miscellaneous options,  Prev: Declarations,  Up: Indent Program
  525.  
  526. Indentation
  527. ===========
  528.  
  529.    One issue in the formatting of code is how far each line should be
  530. indented from the left margin.  When the beginning of a statement such
  531. as `if' or `for' is encountered, the indentation level is increased by
  532. the value specified by the `-i' option.  For example, use `-i8' to
  533. specify an eight character indentation for each level. When a statement
  534. is continued from a previous line, it is indented by a number of
  535. additional spaces specified by the `-ci' option. `-ci' defaults to 0. 
  536. However, if the `-lp' option is specified, and a line has a left
  537. parenthesis which is not closed on that line, then continuation lines
  538. will be lined up to start at the character position just after the left
  539. parenthesis.  This processing also applies to `[' and applies to `{'
  540. when it occurs in initialization lists.  For example, a piece of
  541. continued code might look like this with `-nlp -ci3' in effect:
  542.  
  543.        p1 = first_procedure (second_procedure (p2, p3),
  544.           third_procedure (p4, p5));
  545.  
  546. With `-lp' in effect the code looks somewhat clearer:
  547.  
  548.        p1 = first_procedure (second_procedure (p2, p3),
  549.                              third_procedure (p4, p5));
  550.  
  551.    `indent' assumes that tabs are placed at regular intervals of both
  552. input and output character streams.  These intervals are by default 8
  553. columns wide, but (as of version 1.2) may be changed by the `-ts'
  554. option.  Tabs are treated as the equivalent number of spaces.
  555.  
  556.    The indentation of type declarations in old-style function
  557. definitions is controlled by the `-ip' parameter.  This is a numeric
  558. parameter specifying how many spaces to indent type declarations.  For
  559. example, the default `-ip5' makes definitions look like this:
  560.  
  561.      char *
  562.      create_world (x, y, scale)
  563.           int x;
  564.           int y;
  565.           float scale;
  566.      {
  567.        . . .
  568.      }
  569.  
  570.    For compatibility with other versions of indent, the option `-nip'
  571. is provided, which is equivalent to `-ip0'.
  572.  
  573.    ASCII C allows white space to be placed on preprocessor command lines
  574. between the character `#' and the command name.  By default, `indent'
  575. removes this space, but specifying the `-lps' option directs `indent'
  576. to leave this space unmodified.
  577.  
  578. File: indent.info,  Node: Miscellaneous options,  Next: Copyright,  Prev: Indentation,  Up: Indent Program
  579.  
  580. Miscellaneous options
  581. =====================
  582.  
  583.    To find out what version of `indent' you have, use the command
  584. `indent -version'.  This will report the version number of `indent',
  585. without doing any of the normal processing.
  586.  
  587.    The `-v' option can be used to turn on verbose mode.  When in
  588. verbose mode, `indent' reports when it splits one line of input into
  589. two more more lines of output, and gives some size statistics at
  590. completion.
  591.  
  592. File: indent.info,  Node: Copyright,  Prev: Miscellaneous options,  Up: Indent Program
  593.  
  594. Copyright
  595. =========
  596.  
  597.    The following copyright notice applies to the `indent' program. The
  598. copyright and copying permissions for this manual appear near the
  599. beginning of this document.
  600.  
  601.      Copyright (c) 1989, 1992 Free Software Foundation
  602.      Copyright (c) 1985 Sun Microsystems, Inc.
  603.      Copyright (c) 1980 The Regents of the University of California.
  604.      Copyright (c) 1976 Board of Trustees of the University of Illinois.
  605.      All rights reserved.
  606.      
  607.      Redistribution and use in source and binary forms are permitted
  608.      provided that the above copyright notice and this paragraph are
  609.      duplicated in all such forms and that any documentation,
  610.      advertising materials, and other materials related to such
  611.      distribution and use acknowledge that the software was developed
  612.      by the University of California, Berkeley, the University of Illinois,
  613.      Urbana, and Sun Microsystems, Inc.  The name of either University
  614.      or Sun Microsystems may not be used to endorse or promote products
  615.      derived from this software without specific prior written permission.
  616.      THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  617.      IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  618.      WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  619.      PURPOSE.
  620.  
  621. File: indent.info,  Node: Option Summary,  Next: Index,  Prev: Indent Program,  Up: Top
  622.  
  623. Option Summary
  624. **************
  625.  
  626.    Here is a list of all the options for `indent', alphabetized by
  627. short option.  It is followed by a cross key alphabetized by long
  628. option.
  629.  
  630. `-bad'
  631. `--blank-lines-after-declarations'
  632.      Force blank lines after the declarations.
  633.      *Note Blank lines::.
  634.  
  635. `-bap'
  636. `--blank-lines-after-procedures'
  637.      Force blank lines after procedure bodies.
  638.      *Note Blank lines::.
  639.  
  640. `-bbb'
  641. `--blank-lines-after-block-comments'
  642.      Force blank lines after block comments.
  643.      *Note Blank lines::.
  644.  
  645. `-bc'
  646. `--blank-lines-after-commas'
  647.      Force newline after comma in declaration.
  648.      *Note Declarations::.
  649.  
  650. `-bl'
  651. `--braces-after-if-line'
  652.      Put braces on line after `if', etc.
  653.      *Note Statements::.
  654.  
  655. `-bliN'
  656. `--brace-indentN'
  657.      Indent braces N spaces.
  658.      *Note Statements::.
  659.  
  660. `-br'
  661. `--braces-on-if-line'
  662.      Put braces on line with `if', etc.
  663.      *Note Statements::.
  664.  
  665. `-cN'
  666. `--comment-indentationN'
  667.      Put comments to the right of code in column N.
  668.      *Note Comments::.
  669.  
  670. `-cdN'
  671. `--declaration-comment-columnN'
  672.      Put comments to the right of the declarations in column N.
  673.      *Note Comments::.
  674.  
  675. `-cdb'
  676. `--comment-delimiters-on-blank-lines'
  677.      Put comment delimiters on blank lines.
  678.      *Note Comments::.
  679.  
  680. `-ce'
  681. `--cuddle-else'
  682.      Cuddle else and preceeding `}'.
  683.      *Note Comments::.
  684.  
  685. `-ciN'
  686. `--continuation-indentationN'
  687.      Continuation indent of N spaces.
  688.      *Note Statements::.
  689.  
  690. `-cliN'
  691. `--case-indentationN'
  692.      Case label indent of N spaces.
  693.      *Note Statements::.
  694.  
  695. `-cpN'
  696. `--else-endif-columnN'
  697.      Put comments to the right of `#else' and `#endif' statements in
  698.      column N.
  699.      *Note Comments::.
  700.  
  701. `-cs'
  702. `--space-after-cast'
  703.      Put a space after a cast operator.
  704.      *Note Statements::.
  705.  
  706. `-bs'
  707. `--blank-before-sizeof'
  708.      Put a space between `sizeof' and its argument.
  709.      *Note Statements::
  710.  
  711. `-dN'
  712. `--line-comments-indentationN'
  713.      Set indentation of comments not to the right of code to N spaces.
  714.      *Note Comments::.
  715.  
  716. `-diN'
  717. `--declaration-indentationN'
  718.      Put variables in column N.
  719.      *Note Declarations::.
  720.  
  721. `-fc1'
  722. `--format-first-column-comments'
  723.      Format comments in the first column.
  724.      *Note Comments::.
  725.  
  726. `-fca'
  727. `--format-all-comments'
  728.      Do not disable all formatting of comments.
  729.      *Note Comments::
  730.  
  731. `-gnu'
  732. `--gnu-style'
  733.      Use GNU coding style.  This is the default.
  734.      *Note Common styles::.
  735.  
  736. `-iN'
  737. `--indent-levelN'
  738.      Set indentation level to N spaces.
  739.      *Note Indentation::.
  740.  
  741. `-ipN'
  742. `--parameter-indentationN'
  743.      Indent parameter types in old-style function definitions by N
  744.      spaces.
  745.      *Note Indentation::.
  746.  
  747. `-kr'
  748. `--k-and-r-style'
  749.      Use Kernighan & Ritchie coding style.
  750.      *Note Common styles::.
  751.  
  752. `-lN'
  753. `--line-lengthN'
  754.      Set maximum line length to N.
  755.      *Note Comments::.
  756.  
  757. `-lp'
  758. `--continue-at-parentheses'
  759.      Line up continued lines at parentheses.
  760.      *Note Indentation::.
  761.  
  762. `-lps'
  763. `--leave-preprocessor-space'
  764.      Leave space between `#' and preprocessor directive. *Note
  765.      Indentation::.
  766.  
  767. `-nbad'
  768. `--no-blank-lines-after-declarations'
  769.      Do not force blank lines after declarations.
  770.      *Note Blank lines::.
  771.  
  772. `-nbap'
  773. `--no-blank-lines-after-procedures'
  774.      Do not force blank lines after procedure bodies.
  775.      *Note Blank lines::.
  776.  
  777. `-nbbb'
  778. `--no-blank-lines-after-block-comments'
  779.      Do not force blank-lines after block comments.
  780.      *Note Blank lines::.
  781.  
  782. `-nbc'
  783. `--no-blank-lines-after-commas'
  784.      Do not force newlines after commas in declarations.
  785.      *Note Declarations::.
  786.  
  787. `-ncdb'
  788. `--no-comment-delimiters-on-blank-lines'
  789.      Do not put comment delimiters on blank lines.
  790.      *Note Comments::.
  791.  
  792. `-nce'
  793. `--dont-cuddle-else'
  794.      Do not cuddle `}' and `else'.
  795.      *Note Statements::.
  796.  
  797. `-ncs'
  798. `--no-space-after-casts'
  799.      Do not put a space after cast operators.
  800.      *Note Statements::.
  801.  
  802. `-nfc1'
  803. `--dont-format-first-column-comments'
  804.      Do not format comments in the first column as normal.
  805.      *Note Comments::.
  806.  
  807. `-nfca'
  808. `--dont-format-comments'
  809.      Do not format any comments.
  810.      *Note Comments::.
  811.  
  812. `-nip'
  813. `--no-parameter-indentation'
  814.      Zero width indentation for parameters.
  815.      *Note Indentation::
  816.  
  817. `-nlp'
  818. `--dont-line-up-parentheses'
  819.      Do not line up parentheses.
  820.      *Note Statements::.
  821.  
  822. `-npcs'
  823. `--no-space-after-function-call-names'
  824.      Do not put space after the function in function calls.
  825.      *Note Statements::.
  826.  
  827. `-npsl'
  828. `--dont-break-procedure-type'
  829.      Put the type of a procedure on the same line as its name.
  830.      *Note Declarations::.
  831.  
  832. `-nsc'
  833. `--dont-star-comments'
  834.      Do not put the `*' character at the left of comments.
  835.      *Note Comments::.
  836.  
  837. `-nsob'
  838. `--leave-optional-blank-lines'
  839.      Do not swallow optional blank lines.
  840.      *Note Blank lines::.
  841.  
  842. `-nss'
  843. `--dont-space-special-semicolon'
  844.      Do not force a space before the semicolon after certain statements.
  845.      Disables `-ss'.
  846.      *Note Statements::.
  847.  
  848. `-nv'
  849. `--no-verbosity'
  850.      Disable verbose mode. *Note Miscellaneous options::.
  851.  
  852. `-orig'
  853. `--original'
  854.      Use the original Berkeley coding style.
  855.      *Note Common styles::.
  856.  
  857. `-npro'
  858. `--ignore-profile'
  859.      Do not read `.indent.pro' files.
  860.      *Note Invoking indent::.
  861.  
  862. `-pcs'
  863. `--space-after-procedure-calls'
  864.      Insert a space between the name of the procedure being called and
  865.      the `('.
  866.      *Note Statements::.
  867.  
  868. `-psl'
  869. `--procnames-start-lines'
  870.      Put the type of a procedure on the line before its name.
  871.      *Note Declarations::.
  872.  
  873. `-sc'
  874. `--start-left-side-of-comments'
  875.      Put the `*' character at the left of comments.
  876.      *Note Comments::.
  877.  
  878. `-sob'
  879. `--swallow-optional-blank-lines'
  880.      Swallow optional blank lines.
  881.      *Note Blank lines::.
  882.  
  883. `-ss'
  884. `--space-special-semicolon'
  885.      On one-line `for' and `while' statments, force a blank before the
  886.      semicolon.
  887.      *Note Statements::.
  888.  
  889. `-st'
  890. `--standard-output'
  891.      Write to standard output.
  892.      *Note Invoking indent::.
  893.  
  894. `-T'
  895.      Tell `indent' the name of typenames.
  896.      *Note Declarations::.
  897.  
  898. `-tsN'
  899. `--tab-sizeN'
  900.      Set tab size to N spaces.
  901.      *Note Indentation::.
  902.  
  903. `-v'
  904. `--verbose'
  905.      Enable verbose mode.
  906.      *Note Miscellaneous options::.
  907.  
  908. `-version'
  909.      Output the version number of `indent'.
  910.      *Note Miscellaneous options::.
  911.  
  912. Options' Cross Key
  913. ------------------
  914.  
  915.    Here is a list of options alphabetized by long option, to help you
  916. find the corresponding short option.
  917.  
  918.      --blank-lines-after-block-comments              -bbb
  919.      --blank-lines-after-commas                      -bc
  920.      --blank-lines-after-declarations                -bad
  921.      --blank-lines-after-procedures                  -bap
  922.      --braces-after-if-line                          -bl
  923.      --brace-indent                                  -bli
  924.      --braces-on-if-line                             -br
  925.      --case-indentation                              -cliN
  926.      --comment-delimiters-on-blank-lines             -cdb
  927.      --comment-indentation                           -cN
  928.      --continuation-indentation                      -ciN
  929.      --continue-at-parentheses                       -lp
  930.      --cuddle-else                                   -ce
  931.      --declaration-comment-column                    -cdN
  932.      --declaration-indentation                       -diN
  933.      --dont-break-procedure-type                     -npsl
  934.      --dont-cuddle-else                              -nce
  935.      --dont-format-comments                          -nfca
  936.      --dont-format-first-column-comments             -nfc1
  937.      --dont-line-up-parentheses                      -nlp
  938.      --dont-space-special-semicolon                  -nss
  939.      --dont-star-comments                            -nsc
  940.      --else-endif-column                             -cpN
  941.      --format-all-comments                           -fca
  942.      --format-first-column-comments                  -fc1
  943.      --gnu-style                                     -gnu
  944.      --ignore-profile                                -npro
  945.      --indent-level                                  -iN
  946.      --k-and-r-style                                 -kr
  947.      --leave-optional-blank-lines                    -nsob
  948.      --leave-preprocessor-space                      -lps
  949.      --line-comments-indentation                     -dN
  950.      --line-length                                   -lN
  951.      --no-blank-lines-after-block-comments           -nbbb
  952.      --no-blank-lines-after-commas                   -nbc
  953.      --no-blank-lines-after-declarations             -nbad
  954.      --no-blank-lines-after-procedures               -nbap
  955.      --no-comment-delimiters-on-blank-lines          -ncdb
  956.      --no-space-after-casts                          -ncs
  957.      --no-parameter-indentation                      -nip
  958.      --no-space-after-function-call-names            -npcs
  959.      --no-verbosity                                  -nv
  960.      --original                                      -orig
  961.      --parameter-indentation                         -ipN
  962.      --procnames-start-lines                         -psl
  963.      --space-after-cast                              -cs
  964.      --space-after-procedure-calls                   -pcs
  965.      --space-special-semicolon                       -ss
  966.      --standard-output                               -st
  967.      --start-left-side-of-comments                   -sc
  968.      --swallow-optional-blank-lines                  -sob
  969.      --tab-size                                      -tsN
  970.      --verbose                                       -v
  971.  
  972. File: indent.info,  Node: Index,  Prev: Option Summary,  Up: Top
  973.  
  974. Index
  975. *****
  976.  
  977. * Menu:
  978.  
  979. * --blank-after-sizeof:                 Statements.
  980. * --blank-lines-after-block-comments:   Blank lines.
  981. * --blank-lines-after-commas:           Declarations.
  982. * --blank-lines-after-declarations:     -bad.
  983. * --blank-lines-after-procedures:       -bap.
  984. * --brace-indentN:                      Statements.
  985. * --braces-after-if-line:               Statements.
  986. * --braces-on-if-line:                  Statements.
  987. * --case-indentationN:                  Statements.
  988. * --comment-delimiters-on-blank-lines:  Comments.
  989. * --comment-indentationN:               Comments.
  990. * --continuation-indentationN:          Indentation.
  991. * --continue-at-parentheses:            Indentation.
  992. * --cuddle-else:                        Statements.
  993. * --declaration-comment-columnN:        Comments.
  994. * --declaration-indentationN:           Declarations.
  995. * --dont-break-procedure-type:          Declarations.
  996. * --dont-cuddle-else:                   Statements.
  997. * --dont-format-comments:               Comments.
  998. * --dont-format-first-column-comments:  Comments.
  999. * --dont-line-up-parentheses:           Indentation.
  1000. * --dont-space-special-semicolon:       Statements.
  1001. * --dont-star-comments:                 Comments.
  1002. * --else-endif-columnN:                 Comments.
  1003. * --format-all-comments:                Comments.
  1004. * --format-first-column-comments:       Comments.
  1005. * --gnu-style:                          Common styles.
  1006. * --ignore-profile:                     Invoking indent.
  1007. * --indent-levelN:                      Indentation.
  1008. * --k-and-r-style:                      Common styles.
  1009. * --leave-optional-blank-lines:         Blank lines.
  1010. * --leave-preprocessor-space:           Indentation.
  1011. * --line-comments-indentationN:         Comments.
  1012. * --line-lengthN:                       Comments.
  1013. * --no-blank-lines-after-block-comments: Blank lines.
  1014. * --no-blank-lines-after-commas:        Declarations.
  1015. * --no-blank-lines-after-declarations:  -bad.
  1016. * --no-blank-lines-after-procedures:    -bap.
  1017. * --no-comment-delimiters-on-blank-lines: Comments.
  1018. * --no-parameter-indentation:           Indentation.
  1019. * --no-space-after-casts:               Statements.
  1020. * --no-space-after-function-call-names: Statements.
  1021. * --no-verbosity:                       Miscellaneous options.
  1022. * --original:                           Common styles.
  1023. * --output-file:                        Invoking indent.
  1024. * --parameter-indentationN:             Indentation.
  1025. * --procnames-start-lines:              Declarations.
  1026. * --space-after-cast:                   Statements.
  1027. * --space-after-procedure-calls:        Statements.
  1028. * --space-special-semicolon:            Statements.
  1029. * --standard-output:                    Invoking indent.
  1030. * --start-left-side-of-comments:        Comments.
  1031. * --swallow-optional-blank-lines:       Blank lines.
  1032. * --tab-sizeN:                          Indentation.
  1033. * --verbose:                            Miscellaneous options.
  1034. * -T:                                   Declarations.
  1035. * -bad:                                 -bad.
  1036. * -bap:                                 -bap.
  1037. * -bbb:                                 Blank lines.
  1038. * -bc:                                  Declarations.
  1039. * -bl:                                  Statements.
  1040. * -bliN:                                Statements.
  1041. * -br:                                  Statements.
  1042. * -bs:                                  Statements.
  1043. * -cN:                                  Comments.
  1044. * -cdN:                                 Comments.
  1045. * -cdb:                                 Comments.
  1046. * -ce:                                  Statements.
  1047. * -ciN:                                 Indentation.
  1048. * -cliN:                                Statements.
  1049. * -cpN:                                 Comments.
  1050. * -cs:                                  Statements.
  1051. * -dN:                                  Comments.
  1052. * -dce:                                 Statements.
  1053. * -diN:                                 Declarations.
  1054. * -fc1:                                 Comments.
  1055. * -fca:                                 Comments.
  1056. * -gnu:                                 Common styles.
  1057. * -iN:                                  Indentation.
  1058. * -ipN:                                 Indentation.
  1059. * -kr:                                  Common styles.
  1060. * -lN:                                  Comments.
  1061. * -lp:                                  Indentation.
  1062. * -lps:                                 Indentation.
  1063. * -nbad:                                -bad.
  1064. * -nbap:                                -bap.
  1065. * -nbbb:                                Blank lines.
  1066. * -nbc:                                 Declarations.
  1067. * -ncdb:                                Comments.
  1068. * -ncs:                                 Statements.
  1069. * -nfc1:                                Comments.
  1070. * -nfca:                                Comments.
  1071. * -nip:                                 Indentation.
  1072. * -nlp:                                 Indentation.
  1073. * -npcs:                                Statements.
  1074. * -npro:                                Invoking indent.
  1075. * -npsl:                                Declarations.
  1076. * -nsc:                                 Comments.
  1077. * -nsob:                                Blank lines.
  1078. * -nss:                                 Statements.
  1079. * -nv:                                  Miscellaneous options.
  1080. * -o:                                   Invoking indent.
  1081. * -orig:                                Common styles.
  1082. * -pcs:                                 Statements.
  1083. * -psl:                                 Declarations.
  1084. * -sc:                                  Comments.
  1085. * -sob:                                 Blank lines.
  1086. * -ss:                                  Statements.
  1087. * -st:                                  Invoking indent.
  1088. * -tsN:                                 Indentation.
  1089. * -v:                                   Miscellaneous options.
  1090. * -version:                             Miscellaneous options.
  1091. * etags requires -psl:                  Declarations.
  1092. * .indent.pro file:                     Invoking indent.
  1093. * Beginning indent:                     Invoking indent.
  1094. * Berkeley style:                       Common styles.
  1095. * Blank lines:                          Blank lines.
  1096. * Comments:                             Comments.
  1097. * GNU style:                            Common styles.
  1098. * Initialization file:                  Invoking indent.
  1099. * Invoking indent:                      Invoking indent.
  1100. * Kernighan & Ritchie style:            Common styles.
  1101. * Long options, use of:                 Invoking indent.
  1102. * Original Berkeley style:              Common styles.
  1103. * Output File Specification:            Invoking indent.
  1104. * Standard Output:                      Invoking indent.
  1105. * Starting indent:                      Invoking indent.
  1106. * Typenames:                            Declarations.
  1107. * Using Standard Input:                 Invoking indent.
  1108.  
  1109.  
  1110. Tag Table:
  1111. Node: Top410
  1112. Node: Indent Program918
  1113. Node: Invoking indent1865
  1114. Node: Backup files5046
  1115. Node: Common styles6913
  1116. Node: Blank lines9137
  1117. Node: -bad10363
  1118. Node: -bap11012
  1119. Node: Comments11875
  1120. Node: Statements14249
  1121. Node: Declarations16248
  1122. Node: Indentation17865
  1123. Node: Miscellaneous options20182
  1124. Node: Copyright20729
  1125. Node: Option Summary22125
  1126. Node: Index31669
  1127. End Tag Table
  1128.